<?
if ( !defined ( 'L_MOD' ) )
{
	echo "<meta http-equiv='refresh' content='0; url=/index.php?nma=error&fla=403'>";
	exit;
}
$query=mysql_query("SELECT * FROM ".$wcpref.$nma."_product WHERE mod_id_prod='".$lid."'");
$result=mysql_fetch_array($query);
extract($result);

print '<h2>'.$mod_product.'</h2>';

$query=mysql_query("SELECT * FROM ".$wcpref.$nma."_razd WHERE mod_prod_id='".$lid."' ORDER BY mod_nomer ASC");
print '<br><table border="0" cellpadding="3" cellspacing="1" align="center" width="98%">';
while($result=mysql_fetch_array($query))
{
	extract($result);
	$query_p=mysql_query("SELECT * FROM ".$wcpref.$nma." WHERE mod_razd_id= '".$mod_id."' ORDER BY mod_nom ASC");
	print '<tr class="head">
		<td width="30" align="center">'.$mod_nomer.'</td>
		<td colspan="2">'.$mod_razdel.'</td>
	</tr>';
	$d=0;
	while($result_p=mysql_fetch_array($query_p))
	{
		$d++;$iclass = ($d % 2) ? "even" : "odd";
		extract($result_p);
		print'<tr class="'.$iclass.'">
			<td colspan="2" align="right">'.$mod_nomer.'.'.$mod_nom.'</td>
			<td><a href="index.php?nma='.$nma.'&fla=viewpage&page='.$mod_id_p.'">'.$mod_name.'</a></td>
		</tr>';
	}
}
print'</table>';

include("menu.php");
?>